'''
Author: goog
Date: 2022-06-08 10:26:25
LastEditTime: 2022-08-16 19:27:48
LastEditors: goog
Description: track 数据集 字典属性 读取生成好的info文件夹
FilePath: /ByteDance/ctr/config/datasets.py
Time Limit Exceeded!
'''
import json
class DatasetsConfig(object):
    def __init__(self, path) -> None:
        with open(path, 'r') as f:
            self.config = json.load(f)
    def dictionary_size(self, key):
        return self.config[key].get('len', None)
    
    def min_val(self, key):
        return self.config[key].get('min', None)

    def max_val(self, key):
        return self.config[key].get('max', None)
    def datasets_len(self):
        return self.config['track_total']